#include<iostream>
#include<string.h>
using namespace std;


void array( int a[], int n) {
	for (int i = 0; i <n; i++) {
		cout << a[i];
		if (i != n) {
			cout << " ";
		}
	}



}

int main() {

	int a[100], i = -1;

	while (a[i] != -9999) {
		i++;
		cin >> a[i];

	}
	array(a, i);
	return 0;

}
